package com.itheima.cs.entity.dyewm;


import android.os.Parcel;
import android.os.Parcelable;

public class MaterialInfo implements Parcelable {
    private String code;
    private String name;
    private String spec;
    //物料二维码上需要绑定一个唯一UUID
    private String dbdUUID;

    public MaterialInfo(String code, String name, String spec) {
        this.code = code;
        this.name = name;
        this.spec = spec;
    }

    public String getCode() { return code; }
    public String getName() { return name; }
    public String getSpec() { return spec; }

    public String getDbdUUID() {
        return dbdUUID;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public void setDbdUUID(String dbdUUID) {
        this.dbdUUID = dbdUUID;
    }

    protected MaterialInfo(Parcel in) {
        code = in.readString();
        name = in.readString();
        spec = in.readString();
    }

    public static final Creator<MaterialInfo> CREATOR = new Creator<MaterialInfo>() {
        @Override
        public MaterialInfo createFromParcel(Parcel in) {
            return new MaterialInfo(in);
        }

        @Override
        public MaterialInfo[] newArray(int size) {
            return new MaterialInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(code);
        dest.writeString(name);
        dest.writeString(spec);
    }
}

